﻿Imports System.Timers
Imports System.Threading

Public Class Form1

    Public Sub New()

        ' 此调用是设计器所必需的。
        InitializeComponent()

        ' 在 InitializeComponent() 调用之后添加任何初始化。
        Dim _mytaks As MyTasks
        _mytaks = New MyTasks("default")
        _mytaks.StartTask()

        DataGridView1.DataSource = _mytaks.Tasks
        'Dim _ti As System.Threading.Timer

        'Dim task As taskDelegate = AddressOf reload

        'If _ti Is Nothing Then
        '    Dim tiCallback As TimerCallback = New TimerCallback(AddressOf DataGridView1.Refresh)

        '    _ti = New System.Threading.Timer(tiCallback, DataGridView1, 0, 1000)
        'Else
        '    _ti.Change(1000, 1000)
        'End If

    End Sub


End Class